package org.example.builder;

import org.example.utils.DateUtils;

import java.io.BufferedWriter;
import java.io.IOException;
import java.util.Date;

/**
 * 构建注解 类 方法 属性
 */


public class BuildComment {
    public static void  createClassComment(BufferedWriter bw,String classComment) throws IOException {

        bw.write("/**");
        bw.newLine();
        bw.write(" * @Description:" + classComment );
        bw.newLine();
        bw.write(" * "  );
        bw.newLine();
        bw.write(" * @Date:" + DateUtils.format(new Date(),DateUtils._YYYYMMDD));
        bw.newLine();
        bw.write(" */");
        bw.newLine();




    }
    public static void  createFieldComment(BufferedWriter bw,String fieldComment) throws IOException{

        if(fieldComment == null) {
            fieldComment = "";
        }
        bw.write("\t/**");
        bw.newLine();

        bw.write("\t * "  + fieldComment );
        bw.newLine();

        bw.write("\t */");
        bw.newLine();
    }
    public static void  createMethodComment() {

    }
}
